home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
UTIL
/
ES 1.2 Package.sit
/
ES 1.2 Package
/
Developer’s toolkit
/
ESDemo.c 1.1.1 ƒ
/
ESDemo.h
< prev
next >
Wrap
Text File
|
1995-11-20
|
3KB
|
107 lines
/* ---------------------------------------------------------------------------
ESDemo.h
ゥ1995 Ammon Skidmore, Skidperfect Software Inc. All Rights Reserved.
--------------------------------------------------------------------------- */
#ifndef SystemSevenOrLater
#define SystemSevenOrLater 1
#endif
#define rIconSuiteId 257
#define rPopupMenuID 256
#define rArrowPictID 256
#define rMyStringsID 256
#define kHelpStringIndex 1 // index of the help string
#define kTriangleWidth 9 // == width((*(**globH).myArrowPict)->picFrame);
#define kSmallIconWidth 16
#define kLargeIconWidth 32
enum
{
kBeepIfPPC = 1,
kHiliteClicks = 3,
kCustomBalloons = 4,
kCheckKeyDowns = 5,
kUseLargeIcon = 6,
kUseDragNDrop = 8,
kDragFiles = 9,
kDragTextClippings = 10,
kSafeFinderQuit1 = 12,
kSafeFinderQuit2 = 13,
kCloseDown = 15
};
#define kFinderType 'FNDR'
#define kSysCreator 'MACS'
// useful macros:
#define width(rect) ((rect).right - (rect).left) // macro for rect width
#define height(rect) ((rect).bottom - (rect).top) // macro for rect height
#define PicFrame(what) ((**MyGlobals.what).picFrame) // macro for picture frame rect
#define pstrcpy(dst, src) (BlockMove((src), (dst), (src)[0] + 1))
#ifndef __ICONS__
#include <Icons.h>
#endif __ICONS__
#ifndef __DRAG__
#include <Drag.h>
#endif __DRAG__
#ifndef __CONTROLSTRIP__
#include <ControlStrip.h>
#endif __CONTROLSTRIP__
#ifndef __EXTENSIONSSTRIP__
#include "ExtensionsStrip.h"
#endif __EXTENSIONSSTRIP__
// our structures:
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
typedef struct
{
Handle iconSuite;
MenuRef myMenuH;
Handle myStrings;
PicHandle myArrowPict;
Boolean hasExtensionsStrip;
Boolean useLargeIcon;
long currentFeatures;
// Drag globals:
DragTrackingHandlerUPP myTrackingUPP;
DragReceiveHandlerUPP myReceiveUPP;
Boolean canAcceptDrag, hasEntered;
Boolean acceptFiles, acceptText;
ModuleReference myReferenceNum; // required only for Extensions Strip
Rect myBox; // required only for Control/Desktop Strip
} MyGlobals, *MyGlobalPtr, **MyGlobalHandle;
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
// our prototypes:
void sdevDraw(MyGlobalHandle myGlobals, Rect *statusRect, GrafPtr statusPort);
void sdevClose(MyGlobalHandle myGlobals, WindowRef statusPort);
long sdevInit(WindowRef statusPort);
long sdevClick(MyGlobalHandle myGlobals, const Rect *statusRect, WindowRef statusPort);
//
Boolean HasDragMgr(void);
void InstallDragHandlers(WindowRef statusPort, MyGlobalHandle myH);
void RemoveDragHandlers(WindowRef statusPort, MyGlobalHandle myH);
Boolean HasExtensionsStrip(void);
//
OSErr FindAProcess(OSType typeToFind, OSType creatorToFind,
ProcessSerialNumberPtr processSN,
ProcessInfoRecPtr infoRecToFill);
void QuitProcess (ProcessSerialNumber PSN, Boolean hasExtensionsStrip);
void DrawMyIcon(MyGlobalHandle myGlobals, Boolean selected);
pascal OSErr MyTrackingHandler(short message, WindowRef theWindow,
void *handlerRefCon, DragReference theDrag);
pascal OSErr MyReceiveDropHandler(WindowRef theWindow, void *handlerRefCon,
DragReference theDrag);